Produced by Araxis Merge on 2020-08-14 00:01:33 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | 2020-08-14 00:01:33 +0000 | ||
| 2 | Porto v3.2.4/Magento 2.x/Porto Theme/app/code/Mageplaza/LayeredNavigation/Plugin/PageCache | ProcessRequest.php | 2020-06-26 11:11:14 +0000 |
| Description | Between Files 1 and 2 | |
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 1 | 72 |
| Removed | 0 | 0 |
| Whitespace | Consecutive whitespace is treated as a single space |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
| Active line-pairing rules |
No regular expressions were active.
| 1 | <?php | |||||
| 2 | /** | |||||
| 3 | * Mageplaza | |||||
| 4 | * | |||||
| 5 | * NOTICE OF LICENSE | |||||
| 6 | * | |||||
| 7 | * This source file is subject to the Mageplaza.com license that is | |||||
| 8 | * available through the world-wide-web at this URL: | |||||
| 9 | * https://www.mageplaza.com/LICENSE.txt | |||||
| 10 | * | |||||
| 11 | * DISCLAIMER | |||||
| 12 | * | |||||
| 13 | * Do not edit or add to this file if you wish to upgrade this extension to newer | |||||
| 14 | * version in the future. | |||||
| 15 | * | |||||
| 16 | * @category Mageplaza | |||||
| 17 | * @package Mageplaza_LayeredNavigation | |||||
| 18 | * @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/) | |||||
| 19 | * @license https://www.mageplaza.com/LICENSE.txt | |||||
| 20 | */ | |||||
| 21 | ||||||
| 22 | namespace Mageplaza\LayeredNavigation\Plugin\PageCache; | |||||
| 23 | ||||||
| 24 | use Magento\Framework\App\PageCache\Kernel; | |||||
| 25 | use Magento\Framework\App\Request\Http; | |||||
| 26 | use Mageplaza\LayeredNavigation\Helper\Data; | |||||
| 27 | ||||||
| 28 | /** | |||||
| 29 | * Class ProcessRequest | |||||
| 30 | * @package Mageplaza\LayeredNavigation\Plugin\PageCache | |||||
| 31 | */ | |||||
| 32 | class ProcessRequest | |||||
| 33 | { | |||||
| 34 | /** | |||||
| 35 | * @var Http | |||||
| 36 | */ | |||||
| 37 | protected $request; | |||||
| 38 | ||||||
| 39 | /** | |||||
| 40 | * @var Data | |||||
| 41 | */ | |||||
| 42 | protected $helperData; | |||||
| 43 | ||||||
| 44 | /** | |||||
| 45 | * ProcessRequest constructor. | |||||
| 46 | * | |||||
| 47 | * @param Http $request | |||||
| 48 | * @param Data $helperData | |||||
| 49 | */ | |||||
| 50 | public function __construct( | |||||
| 51 | Http $request, | |||||
| 52 | Data $helperData | |||||
| 53 | ) { | |||||
| 54 | $this->request = $request; | |||||
| 55 | $this->helperData = $helperData; | |||||
| 56 | } | |||||
| 57 | ||||||
| 58 | /** | |||||
| 59 | * @param Kernel $subject | |||||
| 60 | */ | |||||
| 61 | public function beforeLoad(Kernel $subject) | |||||
| 62 | { | |||||
| 63 | if ($this->helperData->isEnabled()) { | |||||
| 64 | $payload = Data::jsonDecode($this->request->getContent()); | |||||
| 65 | $isLayer = isset($payload['mp_layer']) ? $payload['mp_layer'] : false; | |||||
| 66 | ||||||
| 67 | if ($isLayer) { | |||||
| 68 | $this->request->setMethod('GET'); | |||||
| 69 | } | |||||
| 70 | } | |||||
| 71 | } | |||||
| 72 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993–2019 Araxis Ltd (www.araxis.com). All rights reserved.